package com.poorstu.dao.impl;

import java.util.List;


import com.common.base.dao.impl.BaseDaoImpl;
import com.poorstu.dao.PowerDao;
import com.poorstu.model.PowerMod;

public class PowerDaoImpl extends BaseDaoImpl implements PowerDao {

	public List<PowerMod> getPowerAll() {
		try {
			return (List<PowerMod>)super.findAll("PowerMod");
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	}

	public PowerMod getPower(int powerId) {
		try {
			return (PowerMod)super.findByHql("from PowerMod where powerId = " + powerId).get(0);
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
		
	}


}
